<template>
	<p>AComp</p>
	<p>{{ count }}</p>
	<button @click="emit('update')">update</button>
</template>

<script setup>
import { defineProps, defineEmits } from "vue";

// props在setup才能使用
const props = defineProps({
	count: {
		type: Number,
		required: true,
	},
});

const emit = defineEmits(["update"]);

console.log(props.count);
</script>

<style></style>
